<?php
/**
 * 文件上传API控制器
 * @author 王勇程 <laughskydragon@qq.com>
 */

namespace app\api\controller;

use app\api\controller\ApiBase;

class Upload extends ApiBase
{
    /**
     * 上传图片
     */
    public function uploadImage()
    {
        $data = $this->request->param();
        $result = $this->logicUpload->uploadImage($data);
        return $this->apiReturn($result);
    }
    
    /**
     * 上传文件
     */
    public function uploadFile()
    {
        $data = $this->request->param();
        $result = $this->logicUpload->uploadFile($data);
        return $this->apiReturn($result);
    }
    
    /**
     * 删除文件
     */
    public function deleteFile()
    {
        $data = $this->request->param();
        $result = $this->logicUpload->deleteFile($data);
        return $this->apiReturn($result);
    }
}